﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NET.Action
{
    public class BaseAction
    {
        public string Name;

        public BaseAction() { }
        public BaseAction(string name)
        {
            this.Name = name;
        }

        public Action<BaseAction> Eat { get; set; }
        public Func<BaseAction, string> Catch { get; set; }

        public void Info(BaseAction obj)
        {
            Console.WriteLine($"the {Name}");
            Eat(obj);
            var str = Catch(obj);
            Console.WriteLine($"{str}");
        }
    }
}
